//
//  CHSectionView.m
//  CarFile
//
//  Created by 陈浩 on 2017/7/6.
//  Copyright © 2017年 陈浩. All rights reserved.
//

#import "CHSectionView.h"

@interface CHSectionView ()


@end

@implementation CHSectionView


+ (instancetype) sectionView{
    
    CHSectionView *sectionView = [[CHSectionView alloc] initWithFrame:CGRectMake(0, 0, UIScreenW, 50)];
    return sectionView;
}

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor whiteColor];
        [self setupUI];
    }
    return self;
}

-(void)setupUI{
    
    UIView *line = [[UIView alloc] initWithFrame:CGRectMake(15, 20, 4, 20)];
    line.backgroundColor = [UIColor colorWithHexString:@"ff3a68" alpha:1.0f];
    line.layer.cornerRadius = 2;
    line.layer.masksToBounds = YES;
    [self addSubview:line];
    
    
    self.sectionLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(line.frame) +10, 15, UIScreenW - CGRectGetMaxX(line.frame) - 10, 30)];
    self.sectionLabel.font = [UIFont systemFontOfSize:16];
    self.sectionLabel.textColor = [UIColor colorWithHexString:@"333333" alpha:1.0f];
    [self addSubview:self.sectionLabel];
    
    
    
    
}


@end
